<%--
  Created by jianzhang11.
  Date: 2016/8/24 10:48
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx_path" value="<%=request.getContextPath() %>" />
<html>
<head>
    <meta http-equiv="context-Type" context="text/html; charset=UTF-8">
    <title> 合肥丰业办公家居网 - 客户留言 </title>
    <meta name="description" context="合肥丰业办公家居">
    <meta name="keywords" context="合肥家具,丰业,合肥办公家居">
    <link href="${ctx_path}/resources/front/css/css.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="${ctx_path}/resources/front/js/gundong.js"></script>
    <script type=text/javascript src="${ctx_path}/resources/front/js/jquery.js"></script>
    <script type=text/javascript src="${ctx_path}/resources/front/js/sl-1.js"></script>
</head>
<body>
<!--引入头文件 START-->
<%@include file="nav.jsp"%>
<!--引入头文件 END-->
<div style="height:316px; width:100%;background:url(${ctx_path}/resources/front/images/banner3.jpg) no-repeat center top;"></div>
<c:if test="${message != null }">
    <script type="text/javascript">
        alert("${message}");
    </script>
</c:if>
<div class="zhutibg">
    <div class="zhuti">
        <div class="left">
            <div class="left_top">
                客户留言 /<span>Feedback </span></div>
            <div class="left_dh">
                <ul>

                </ul>
            </div>
            <div class="left_top">联系我们 <span>Contact Us</span></div>
            <img src="${ctx_path}/resources/front/images/lxtop.gif" height="111"/>
            <div class="left_lx">
                <strong><span style="font-family: Simsun;">合肥丰业办公家居有限公司</span></strong>
                <br />
                联系人：詹先生/石女士<br />
                联系电话：18756970317/13355605371<br />
                地址：合肥包河区工业园<br />
            </div>
        </div>
        <div class="righta">
            <div class="right_dh">
                <div class="right_dh_l">当前位置：<a href='${ctx_path}/index'>首页</a> > <span>客户留言</span></div>
            </div>
            <script language="javascript">
                function beforeSubmit(form){
                    var telPhone = form.telphone.value;
                    var email = form.email.value;
                    var telReg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                    var emailReg = /^[a-z\d]+(\.[a-z\d]+)*@([\da-z](-[\da-z])?)+(\.{1,2}[a-z]+)+$/;
                    if(form.name.value==''){
                        alert('姓名不能为空！');
                        form.name.focus();
                        return false;
                    }
                    if(telPhone=='' || !telReg.test(telPhone)){
                        alert('电话不能为空或格式有误！');
                        form.telphone.focus();
                        return false;
                    }
                    if(email != '' && !emailReg.test(email)){
                        alert('邮箱格式有误！');
                        form.email.focus();
                        return false;
                    }
                    if(form.title.value==''){
                        alert('标题不能为空！');
                        form.title.focus();
                        return false;
                    }
                    if(form.context.value==''){
                        alert('内容不能为空！');
                        form.context.focus();
                        return false;
                    }
                    return true;
                }
            </script>
            <form action="${ctx_path}/ask" name ="form1"  enctype="multipart/form-data" method="post" onsubmit="return beforeSubmit(this)">
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="10" class="bortable margin_top" style="font-size:12px; line-height:25px;">
                    <tr>
                        <td height="30" colspan="2" ><div>
                            <p>尊敬的用户：</p>
                            <p style="text-indent:2em;"> 您的任何意见或建议都是我们前进的动力。如果您有问题需要向我们咨询，在此留言，我们将
                                第一时间处理您的反馈，<br>
                                谢谢您的支持！</p>
                            <p style="text-indent:2em;">&nbsp;</p>
                        </div></td>
                    </tr>
                    <tr>
                        <td width="20%" height="30" align="right">姓名：</td>
                        <td><input type="text" name="name" value=""  size="30" maxlength="30"  class="ly"  />
                            <font color="red">*</font></td>
                    </tr>
                    <tr>
                        <td height="30" align="right">电话：</td>
                        <td><input type="text" name="telphone" value=""  size="30" maxlength="30"   class="ly" />
                            <font color="red">*</font></td>
                    </tr>
                    <tr>
                        <td height="30" align="right">邮箱：</td>
                        <td><input type="text" name="email" value=""  size="50" maxlength="150"  class="ly"   />
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">标题：</td>
                        <td><input type="text" name="title" value=""  size="50" maxlength="200"  class="ly" />
                            <font color="red">*</font></td>
                    </tr>
                    <tr>
                        <td height="30" align="right">留言：</td>
                        <td><textarea  name="context" cols="60" rows="5" class="ly1"></textarea>
                            <font color="red">*</font></td>
                    </tr>    <tr>
                    <td height="30" align="right">&nbsp;</td>
                    <td><input name="submit" type="submit" value = ' 提交留言'  style="background:#000; color:#FFF;  border:#2e2e2e 1px solid; line-height:30px; width:80px; cursor:pointer;"  />
                        &nbsp;&nbsp;
                        <input name="button" type="button" onclick="javascript:form1.reset();return window_onload();" style="background:#000; color:#FFF;  border:#2e2e2e 1px solid; line-height:30px; width:80px; cursor:pointer;"  value = ' 重新填写'/></td>
                </table>
            </form>
            <div class="clear"></div>

        </div>
    </div>
</div>

<%@include file="footer.jsp"%>

</body>
</html>
